/**Core :RandomCollection Class
 * @ author : Tran Nguyen Anh Tu & Nguyen Thai Duy Khang
 * @ Function : Some random method 
 */
package Ultility;

import java.awt.Font;
import java.awt.GraphicsEnvironment;
import java.util.Random;

public class RandomCollection {
    public RandomCollection()
    {
        
    }
    
    /*
     * Function : Create a random String 
     */
    public static String ChacractersRandom()
    {
    String [] rdCharacters = {"A","B","E","F","G","H","I","J","K","M","N","Z","C","T","P"};
        Random random = new Random();
        String result="";
        for( int i=0;i<10;i++)
        {
            int j=0;
           System.out.println(rdCharacters[j+random.nextInt(rdCharacters.length)]) ;
           result+=rdCharacters[j+random.nextInt(rdCharacters.length)];
        }
        System.out.println(result);
        return result;
    }
    
    /*
     * Function : Create a random FontName
     * @ I don't use getAllFont --> because : I want use some fonts that is difficult to see !!!!
     */
    public static String FontRandom()
    {
        String [] fontString = {"Tempus Sans ITC","Viner Hand ITC","Vivceldi","Vladimire Script"};
        Random random = new Random();
        System.out.println(fontString[random.nextInt(fontString.length)]);
        return fontString[random.nextInt(fontString.length)];     
    }
    public static void main(String []argv)
    {
        RandomCollection a = new RandomCollection();
        System.out.println(a.ChacractersRandom());
    }
}
